Generates a parallel sequence that contains one repeated value.
Namespace:
System.Linq
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Shared Function Repeat(Of TResult) ( _
element As TResult, _
count As Integer _
) As ParallelQuery(Of TResult) |
C# |
---|
public static ParallelQuery<TResult> Repeat<TResult>(
TResult element,
int count
)
|
Parameters
- element
- Type: TResult
The value to be repeated.
- count
- Type: System..::.Int32
The number of times to repeat the value in the generated sequence.
Type Parameters
- TResult
- The type of the value to be repeated in the result sequence.
Return Value
A sequence that contains a repeated value.
Exceptions
Exception | Condition |
---|
System..::.ArgumentOutOfRangeException |
count is less than 0.
|
See Also